package com.tinem.platform.module.starter.jpa.entity.network;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

/**
 * @author fzh
 * @version v1
 * @program: platform
 * @className IpInfo
 * @description IPv4地址范围表
 * @site
 * @company
 * @create 2021-10-29
 */
@Data
@Entity
@ToString
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Table(name="t_iprange_info")
@ApiModel("IPv4地址范围表")
public class IpRangeInfo implements Serializable,Cloneable{
    @Id
    @Column(name = "c_id",nullable=true)
    @ApiModelProperty(name = "id", value = "编号",required = true)
    private Integer id;

    @Column(name = "c_ip_start",nullable=true)
    @ApiModelProperty(name = "ipStart", value = "起始IP",required = true)
    private String ipStart;

    @Column(name = "c_ip_start_num",nullable=true)
    @ApiModelProperty(name = "ipStartNum", value = "IP起始整数",required = true)
    private BigInteger ipStartNum;

    @Column(name = "c_ip_end",nullable=true)
    @ApiModelProperty(name = "ipEnd", value = "结束IP",required = true)
    private String ipEnd;

    @Column(name = "c_ip_end_num",nullable=true)
    @ApiModelProperty(name = "ipEndNum", value = "IP结束整数",required = true)
    private BigInteger ipEndNum;

    @Column(name = "c_country",nullable=true)
    @ApiModelProperty(name = "country", value = "国家/地区/组织",required = true)
    private String country;

    @Column(name = "c_province",nullable=true)
    @ApiModelProperty(name = "province", value = "省/自治区/直辖市",required = false)
    private String province;

    @Column(name = "c_city",nullable=true)
    @ApiModelProperty(name = "city", value = "地级市",required = false)
    private String city;

    @Column(name = "c_area",nullable=true)
    @ApiModelProperty(name = "area", value = "县/区/乡/镇/街道",required = false)
    private String area;

    @Column(name = "c_address",nullable=true)
    @ApiModelProperty(name = "address", value = "详细地址",required = false)
    private String address;

    @Column(name = "c_location",nullable=true)
    @ApiModelProperty(name = "location", value = "运营商/节点",required = false)
    private String location;

    @Column(name = "c_update_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "updateTime", value = "更新日期",required = false)
    private Date updateTime;
}